package com.demo1.controller;

import com.demo1.model.User;
import com.demo1.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import java.util.Scanner;

@Controller
public class UserController {

    //属性注入
    @Autowired
    private UserService userService;

    public void start() {
        System.out.print("请选择您要入职的公司(序号):");
        Scanner input = new Scanner(System.in);
        int choose = input.nextInt();
        switch(choose) {
            case 1:
                System.out.println(userService.intoByteDance());
                break;
            case 2:
                System.out.println(userService.intoBaiDu());
                break;
            case 3:
                System.out.println(userService.intoDajiang());
                break;
            default:
                System.out.println("输入错误，请重新选择~");
        }
    }

}
